package com.ruoyi.thgd.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.thgd.mapper.ThgdJsdChqMapper;
import com.ruoyi.thgd.domain.ThgdJsdChq;
import com.ruoyi.thgd.service.IThgdJsdChqService;

/**
 * 退化耕地- 紧实度 -紧实度传感器Service业务层处理
 * 
 * @author chenhs
 * @date 2024-09-11
 */
@Service
public class ThgdJsdChqServiceImpl implements IThgdJsdChqService 
{
    @Autowired
    private ThgdJsdChqMapper thgdJsdChqMapper;

    /**
     * 查询退化耕地- 紧实度 -紧实度传感器
     * 
     * @param id 退化耕地- 紧实度 -紧实度传感器主键
     * @return 退化耕地- 紧实度 -紧实度传感器
     */
    @Override
    public ThgdJsdChq selectThgdJsdChqById(Integer id)
    {
        return thgdJsdChqMapper.selectThgdJsdChqById(id);
    }

    /**
     * 查询退化耕地- 紧实度 -紧实度传感器列表
     * 
     * @param thgdJsdChq 退化耕地- 紧实度 -紧实度传感器
     * @return 退化耕地- 紧实度 -紧实度传感器
     */
    @Override
    public List<ThgdJsdChq> selectThgdJsdChqList(ThgdJsdChq thgdJsdChq)
    {
        return thgdJsdChqMapper.selectThgdJsdChqList(thgdJsdChq);
    }

    /**
     * 新增退化耕地- 紧实度 -紧实度传感器
     * 
     * @param thgdJsdChq 退化耕地- 紧实度 -紧实度传感器
     * @return 结果
     */
    @Override
    public int insertThgdJsdChq(ThgdJsdChq thgdJsdChq)
    {
        thgdJsdChq.setCreateTime(DateUtils.getNowDate());
        return thgdJsdChqMapper.insertThgdJsdChq(thgdJsdChq);
    }

    /**
     * 修改退化耕地- 紧实度 -紧实度传感器
     * 
     * @param thgdJsdChq 退化耕地- 紧实度 -紧实度传感器
     * @return 结果
     */
    @Override
    public int updateThgdJsdChq(ThgdJsdChq thgdJsdChq)
    {
        thgdJsdChq.setUpdateTime(DateUtils.getNowDate());
        return thgdJsdChqMapper.updateThgdJsdChq(thgdJsdChq);
    }

    /**
     * 批量删除退化耕地- 紧实度 -紧实度传感器
     * 
     * @param ids 需要删除的退化耕地- 紧实度 -紧实度传感器主键
     * @return 结果
     */
    @Override
    public int deleteThgdJsdChqByIds(Integer[] ids)
    {
        return thgdJsdChqMapper.deleteThgdJsdChqByIds(ids);
    }

    /**
     * 删除退化耕地- 紧实度 -紧实度传感器信息
     * 
     * @param id 退化耕地- 紧实度 -紧实度传感器主键
     * @return 结果
     */
    @Override
    public int deleteThgdJsdChqById(Integer id)
    {
        return thgdJsdChqMapper.deleteThgdJsdChqById(id);
    }
}
